package obth;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

public class BootStraper {
    public static void main(String[] args) {
        init(args);
    }
    public static void init(String[] args){
        BlockingQueue<ReqRes> topic_req = new ArrayBlockingQueue<>(10);
        BlockingQueue<PageEvent> topic_event = new ArrayBlockingQueue<>(16);
        String t_name = Thread.currentThread().getName();
        new Thread(new PageThread(topic_event,topic_req),
                t_name+"-page").start();

        new Thread(new ReqResThread(topic_req,topic_event),
                t_name+"-ReqRes").start();
        new Thread(new UserThread(topic_event),
                t_name+"-user").start();
        new Thread(new Tool(),
                t_name+"-tool").start();
    }

}
